package org.yag.lyf.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.yag.lyf.entity.UserInfo;

/**
 * Title: Class CommentsShow
 * Description:
 * 注释展示类，说明各种方法注释怎么写
 *
 * @author qiang.yang
 * @version 1.0.0
 * @email qiang.yang@chinaredstar.com
 * @date: 2016/9/8 12:26
 */
@Api(value = "" ,description = "测试User")
@RestController
@RequestMapping(value="/user")
public class UserInfoController {

    @ApiOperation(value="获取User", notes="根据User对象创建用户")
    @RequestMapping(value = "getUserInfo" ,method = RequestMethod.POST)
    public UserInfo getUserInfo(){
        UserInfo use = new UserInfo();
        use.setId(1);
        use.setUrlId(2);
        use.setSalt("salt");
        use.setUrseName("yag");
        use.setUserPassword("lyf");
        return use;
    }
    @ApiOperation(value="获取UserInfo", notes="根据User对象创建用户")
    @ApiImplicitParam(name = "use", value = "用户详细实体user", required = true, dataType = "UserInfo")
    @RequestMapping(value = "TestUserInfo",method = RequestMethod.POST)
    public UserInfo queryUserInfo(@RequestBody UserInfo use){
        return use;
    }
}
